Using Station Mode

Last update: October 2017

Station (STA) mode is a mode to use FlashAir as a client in a wireless LAN. This tutorial shows how to configure FlashAir to be station mode.

Outline

Access Point mode

FlashAir runs as a Access Point (AP) mode by default. A wireless LAN device such as a PC and smartphone connects to the FlashAir as a wireless LAN client (station). So the device cannot access to the Internet when the device connected to the FlashAir.

Image1

Station mode

We can configure FlashAir to be station mode. It allows for a development machines to access to the FlashAir and the Internent at a same time.

Image2

How to configure

We need to set FlashAir operation mode, information about a wireless LAN AP, and a name to identify the FlashAir before we configure the card to be station mode. There are two ways to configure: 1) modifying CONFIG file directly, and 2) using config.cgi via wireless LAN connection.

Parameters to change

Following four parameters need to be changed. A word with brackets is a corresponding parameter explained in API Guide / CONFIG.

Operation Mode(APPMODE)
Set this parameter to 5 to change the card as station mode.
Wireless LAN SSID (APPSSID)
Specify a SSID of an AP where the card will connect to.
Wireless LAN Network Key (APPNETWORKKEY)
Specify a keyword of an AP where the card will connect to.
FlashAir Identifier (APPNAME)
Specify a unique name for a FlashAir card to identify it within a wireless LAN.

Method 1: Modify configuration file directly.

We can modify the parameters by editing /SD_WLAN/CONFIG directly.
There are hidden attributes attached to this directory, therefore we will use tools to handle this hidden folder.
(If you use a Mac, edit /Volumes/(Volume Lable Name)/SD_WLAN/CONFIG.)
We need to add a parameter if it does not exist in the file. We need not care about the order of the parameters.

After editing, the file will be like the following example:

APPMODE=5
APPNAME=myflashair
APPSSID=FOOSSID
APPNETWORKKEY=password0123
CIPATH=/DCIM/100__TSB/FA000001.JPG
VERSION=F19BAW3AW2.00.00
CID=02544d535730384708c00b7d7800d201
PRODUCT=FlashAir
VENDOR=TOSHIBA
MASTERCODE=18002d4ff0a2

Method 2: Using config.cgi

We can change the parameters except FlashAir Identifier (APPNAME) through wireless LAN by using config.cgi.

We need the Mastercode to configure the parameters. If the Mastercode is not set to your card, set it by calling a command. For example:

http://flashair/config.cgi?MASTERCODE=18002d4ff0a2

After that, we will send a command as follows to set parameters:

http://flashair/config.cgi?MASTERCODE=18002d4ff0a2&APPSSID=FOOSSID&APPNETWORKKEY=password0123&APPMODE=5

FlashAir will reboot after it received the configuration command.

Important: If you use an Android device, see Usage Note section below.

How to access FlashAir in Station Mode

We can access FlashAir card which is correctly configured to the Station Mode from a device such as a PC or a smartphone which is connected to the same wireless LAN.

For example, input a URL with the FlashAir identifier (APPNAME) to your browser like:

http://myflashair/

If you use a Mac, use this instead:

http://myflashair.local/

Usage Note

Multiple FlashAir in a LAN

Every FlashAir must have unique identifier (APPNAME) if those join a same wireless LAN.

Supported protocols

FlashAir supports NetBIOS over TCP/IP and Bonjour protocols for an another device to look up the FlashAir via the network. (See below.) If you have a trouble to access FlashAir, please check if your device or access point supports those protocols.

Especially, Android device generally does not support them.

If your device or access point does not support those protocols, you can use IP address directly assigned by the access point instead, for example:

http://192.168.0.2/

Important: FlashAir does not support Bonjour Service Announcement.

When you can not connect to FlashAir in Station Mode

If you can not connect to FlashAir after setting APPMODE=5, check the following.

Is the distance between FlashAir and the router appropriate?
Connecting may become unstable if FlashAir and router are too far apart. Also, the connection distance varies depending on obstacles and the network environment. Please try to bring FlashAir and router closer, change the place where the router is placed etc.
Camera etc. SD memory card slot Is power supplied from the equipment side?
You can not connect if the auto power off function of the FlashAir's host device. Turn OFF the automatic power supply function or prolong the time until automatic power OFF.
Is it connected to the router?
You can not connect if the connection with the router is not completed. Check whether the MAC address of FlashAir is displayed on the router setting screen, and check APPSSID, APPNETWORKKEY in the CONFIG file if it is not connected.
Is the Wifi frequency band within the corresponding standard?
FlashAir's wireless LAN function uses 2.4 GHz radio waves. Please change when Wifi connection other than 2.4 GHz band is set.
Is it connected with the effective channel?
Please use the effective channel 1 ch (2,412 MHz) to 11 ch (2,462 MHz) band.
Is FlashAir with the same name on the same network?
In the same network APPNAME must be single. To connect more than one FlashAir please see How to access FlashAir individually using APPNAME.
When making wireless LAN settings common to iSDIO devices, is [WLANSD] set in CONFIG?
When setting wireless LAN common to iSDIO devices, you need to add [WLANSD] to CONFIG. For details, please see CONFIG writing sample.
Can I connect in AP mode?
Please set APPMODE=4 and let FlashAir operate as a wireless LAN parent. If it does not work, there is a possibility that a problem has occurred in FlashAir itself.
Can FlashAir be connected with the personal hotspot of the smartphone?
If you use the personal hotspot of smartphone and you can connect in station mode, there is a possibility that a problem has occurred in the router. Please check the router settings.

Reference Accessing FlashAir with http://flashair/ may cause occasionally a redirect loop. Please set the IP address in CONFIG and access FlashAir. Please set it referring to How to recognaize and access to FlashAir individually by setting IP address.


Please also check FAQ and Toshiba Memory Corporation FAQ together.